/*****************************************************************************
 *   Copyright 2005 Tim A Wang
 *
 *   Licensed under the Apache License, Version 2.0 (the "License");
 *   you may not use this file except in compliance with the License.
 *   You may obtain a copy of the License at
 *
 *       http://www.apache.org/licenses/LICENSE-2.0
 *
 *   Unless required by applicable law or agreed to in writing, software
 *   distributed under the License is distributed on an "AS IS" BASIS,
 *   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *   See the License for the specific language governing permissions and
 *   limitations under the License.
 *
 ****************************************************************************/


package com.jb.identity.domain;
 
import com.jb.web.application.configuration.ConfigBean;


public class Address extends ConfigBean {
    public final static int HOME = 1;
    public final static int BILLING = 2;
    public final static int SHIPPING = 3;
    private String streetLine1;
    private String streetLine2;
    private String city;
    private String state;
    private String country;
    private String postalCode;
    private int type;
    private String owner;

    public boolean isHomeAddress() {
        return HOME == type;
    }

    public boolean isBillingAddress() {
        return BILLING == type;
    }

    public boolean isShippingAddress() {
        return SHIPPING == type;
    }

    public String getStreetLine1() {
        return streetLine1;
    }

    public void setStreetLine1(String pStreetLine1) {
        streetLine1 = pStreetLine1;
    }

    public String getCity() {
        return city;
    }

    public void setCity(String newCity) {
        city = newCity;
    }

    public String getState() {
        return state;
    }

    public void setState(String newState) {
        state = newState;
    }

    public String getCountry() {
        return country;
    }

    public void setCountry(String newCountry) {
        country = newCountry;
    }

    public String getPostalCode() {
        return postalCode;
    }

    public void setPostalCode(String pPostalCode) {
        postalCode = pPostalCode;
    }

    public String getStreetLine2() {
        return streetLine2;
    }

    public void setStreetLine2(String streetLine2) {
        this.streetLine2 = streetLine2;
    }

    public int getType() {
        return type;
    }

    public void setType(int type) {
        this.type = type;
    }

    public String getOwner() {
        return owner;
    }

    public void setOwner(String owner) {
        this.owner = owner;
    }
}
